Add a focus-chain test for focusable containers
authorMatthias Clasen <mclasen@redhat.com>
Tue, 11 Jun 2019 17:10:16 +0000 (17:10 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 11 Jun 2019 17:15:02 +0000 (17:15 +0000)
testsuite/gtk/focus-chain/focusable-container.tab [new file with mode: 0644]
testsuite/gtk/focus-chain/focusable-container.tab-backward [new file with mode: 0644]
testsuite/gtk/focus-chain/focusable-container.ui [new file with mode: 0644]
testsuite/gtk/meson.build

diff --git a/testsuite/gtk/focus-chain/focusable-container.tab b/testsuite/gtk/focus-chain/focusable-container.tab
new file mode 100644 (file)
index 0000000..21816d5
--- /dev/null
@@ -0,0 +1,5 @@
+entry1 GtkText
+box
+entry2 GtkText
+entry3 GtkText
+WRAP
diff --git a/testsuite/gtk/focus-chain/focusable-container.tab-backward b/testsuite/gtk/focus-chain/focusable-container.tab-backward
new file mode 100644 (file)
index 0000000..46d54a6
--- /dev/null
@@ -0,0 +1,5 @@
+entry3 GtkText
+entry2 GtkText
+box
+entry1 GtkText
+WRAP
diff --git a/testsuite/gtk/focus-chain/focusable-container.ui b/testsuite/gtk/focus-chain/focusable-container.ui
new file mode 100644 (file)
index 0000000..e6d2947
--- /dev/null
@@ -0,0 +1,29 @@
+<interface>
+  <object class="GtkWindow" id="window">
+    <child>
+      <object class="GtkBox">
+        <child>
+          <object class="GtkEntry">
+            <property name="name">entry1</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="name">box</property>
+            <property name="can-focus">1</property>
+            <child>
+              <object class="GtkEntry">
+               <property name="name">entry2</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkEntry">
+               <property name="name">entry3</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index f331e02d412b1d474d92413ee30a172f78280942..d3a4ea13f0b026fdaa3a0b7dceaf9619dc4f9de4 100644 (file)
@@ -136,6 +136,8 @@ focus_chain_tests = [
   [ 'basic', 'tab-backward' ],
   [ 'basic', 'left' ],
   [ 'basic', 'right' ],
+  [ 'focusable-container', 'tab' ],
+  [ 'focusable-container', 'tab-backward' ],
 ]
 
 focus_chain = executable(